package com.kenai.jbosh;

import java.util.concurrent.TimeUnit;

final class AttrPolling extends AbstractIntegerAttr
{
  private AttrPolling(String paramString)
    throws BOSHException
  {
    super(paramString);
    checkMinValue(0);
  }

  static AttrPolling createFromString(String paramString)
    throws BOSHException
  {
    AttrPolling localAttrPolling;
    if (paramString == null)
      localAttrPolling = null;
    while (true)
    {
      return localAttrPolling;
      localAttrPolling = new AttrPolling(paramString);
    }
  }

  public int getInMilliseconds()
  {
    return (int)TimeUnit.MILLISECONDS.convert(intValue(), TimeUnit.SECONDS);
  }
}